-
Notifications
You must be signed in to change notification settings - Fork 117
feat: add rattler_glob as a crate #2012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new crate called rattler_glob that provides glob pattern matching with hash computation and modification time tracking capabilities. The crate was originally developed in pixi and has been refactored and adapted for use in the rattler ecosystem, specifically for rattler_build.
Changes:
- Adds
rattler_globcrate with comprehensive glob matching using gitignore-style patterns - Implements hash computation over matched files with line-ending normalization
- Provides modification time tracking and caching for glob-based operations
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/rattler_glob/Cargo.toml | New crate manifest with dependencies on ignore, rattler_digest, tokio, and other workspace crates |
| crates/rattler_glob/src/lib.rs | Main library entry point with comprehensive module documentation |
| crates/rattler_glob/src/glob_set/mod.rs | Core glob matching implementation with rebasing support |
| crates/rattler_glob/src/glob_set/walk_root.rs | Pattern rebasing logic for handling relative paths and computing effective walk roots |
| crates/rattler_glob/src/glob_set/walk.rs | Directory walking implementation with hidden folder handling |
| crates/rattler_glob/src/glob_hash.rs | Hash computation over matched files with line-ending normalization |
| crates/rattler_glob/src/glob_hash_cache.rs | Async caching layer for glob hash computations |
| crates/rattler_glob/src/glob_mtime.rs | Modification time tracking for matched files |
| tests/data/satisfiability/source-dependency/pixi.toml | Test data file for glob hash computation tests |
| tests/data/satisfiability/source-dependency/pixi.lock | Test data file for glob hash computation tests |
| crates/rattler_glob/src/snapshots/*.snap | Insta snapshot files for testing glob hash results |
| Cargo.lock | Updated with new ignore dependency and rattler_glob entry |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
This adds a new crate called
rattler_globthat allows globbing and hash calculations for sets of globs. We have been using this in pixi but are thinking of also using it inrattler_build. So I copied the crate and refactored it a bit with help from Claude to clean it up. I did not really change the API.I think it's okay to go, but I put it in draft so we can take a good look at it.